#ifndef OPTIONS_H
#define OPTIONS_H

#include <QMap>
#include <QString>
#include <QSettings>
#include "global.h"

class Options{
    private:
	static Options * globalOptions;
    protected:
	bool useGlobalOptions;
	QMap<QString, bool> baseOptions;
	QMap<QString, QVariant> extendOptions;
    public:
	Options(bool userOptions = false);
	void copy(Options & other);
	void save(QSettings& settings);
	void restore(QSettings& settings);
	void erase(QSettings& settings);
	virtual bool isUseGlobalOptions() const;
	virtual bool setUseGlobalOptions(bool value);
	virtual bool getOption(QString optionName) const;
	virtual void setOption(QString optionName, bool value);
	virtual void setExtendOption(QString optionName, QVariant value);
	virtual QVariant getExtendOption(QString optionName);
    public:
	static Options * getGlobalOptions();
};

/*
isAutoLogin		 --- 自动登录
isGuestMode		 --- 以来宾账户登录bbs
isSaveUsername		 --- 保存ID
isSavePassword		 --- 保存密码
isStayOnSystray		 --- 停靠系统托盘
isAlarm
isAlarmAny
isAlarmFriend
isAlarmLoveBoard
isAlarmLoveTopic
isAlarmTopic
isAutoCheckNewArticle
isAutoCheckNewBoard
isAutoCheckNewTopic
isUseDock
*/

#endif
// grep '"is' ProfileConfigure.cpp | sed 's/^.*\"\(is.*\)\".*$/\1/' | sort -n
